package lgs.haha;

import java.util.Calendar;
import java.util.Date;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration  //表明是配置类  配置类就是把一些实例丢进容器的
@ComponentScan
public class MyConfig {
	
	@Bean  //容器里的实例都叫been
	public Date date() {
		Date date = new Date();
		Calendar instance = Calendar.getInstance();
		instance.set(Calendar.YEAR, 1949);
		instance.set(Calendar.MONTH, 9);
		instance.set(Calendar.DATE, 1);
		return instance.getTime();
	}
	
	

}
